import request from '@/utils/request'

// 管理电池接口
export function managerList(offset, pageSize, mid, id, pid, status) {
  return request({
    url: '/manager/list',
    method: 'get',
    params: {
      offset: offset,
      pageSize: pageSize,
      mid: mid,
      id: id,
      pid: pid,
      status: status,
    },
  })
}
//所有地点
export function midList() {
  return request({
    url: '/manager/midList',
    method: 'get',
  })
}
//所有电站
export function powerList(mid) {
  return request({
    url: '/manager/powerList',
    method: 'get',
    params: {
      mid: mid,
    },
  })
}
//所有电柜
export function powerStatesList(id) {
  return request({
    url: '/manager/powerStatesList',
    method: 'get',
    params: {
      id: id,
    },
  })
}
//查找电池
export function findId(id) {
  return request({
    url: '/manager/findId',
    method: 'post',
    params: {
      id: id,
    },
  })
}
//修改电池状态
export function updateState(data) {
  return request({
    url: '/manager/updateState',
    method: 'post',
    data,
  })
}
